package com.four.seckill.feign;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.guli.common.utils.R;
import com.guli.common.vo.ManageVo;
import com.guli.common.vo.ParameterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author:lky
 * @Date: 2021/12/21/19:49
 */
@FeignClient("four-shop")
@RequestMapping("shop")
public interface ShopFeignService {
    /**
     * 查询商品信息
     * @return
     */
    @GetMapping("/manage/findAllManage")
    public List<ManageVo> findAllManage();

    /**
     * 查询商品信息+分页+模糊
     * @param page
     * @param pageSize
     * @param vo
     * @return
     */
    @PostMapping("/manage/ManageList")
    public R bargainList(
            @RequestParam(value = "page",defaultValue = "1")Integer page,
            @RequestParam(value = "pageSize",defaultValue = "3")Integer pageSize,
            @RequestBody ManageVo vo
    );
    /**
     * 根据id查询商品
     * @param id
     * @return
     */
    @GetMapping("/manage/getManageById/{id}")
    public ManageVo getManageById(@PathVariable(value = "id") Integer id) ;
    /**
     * 根据商品id查询商品属性
     * @param manId
     * @return
     */
    @GetMapping("/parameter/findParameterById/{id}")
    public List<ParameterVo> findParameterById(@PathVariable("id") Integer manId);



}


